The Gourmet IOS Developer's Cookbook by Erica Sadun

The Gourmet IOS Developer's Cookbook by Erica Sadun

Author:Erica Sadun
Language: eng
Format: epub
Publisher: Pearson Education Limited (US titles)
Published: 2015-11-14T16:00:00+00:00


// Create custom action for the behavior

__weak typeof(self) weakSelf = self;

self.action = ^{

__strong typeof(self) strongSelf = weakSelf;

UIView *view = strongSelf.view;

CGRect currentFrame = view.frame;

CGRect recentFrame = strongSelf.mostRecentFrame;

BOOL steadyFrame = CompareFrames(currentFrame,

recentFrame, strongSelf.pointLaxity);

if (steadyFrame) strongSelf.count++;

NSInteger kThreshold = 5;

if (steadyFrame && (strongSelf.count > kThreshold))

{

[strongSelf.dynamicAnimator

removeBehavior:strongSelf.customBehavior];

[strongSelf.dynamicAnimator removeBehavior:strongSelf];

return;

}



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.